]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
endSessionDialog: Fix a warning
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 22 Aug 2013 20:17:52 +0000 (16:17 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 22 Aug 2013 21:15:03 +0000 (17:15 -0400)
If _timerId is undefined/null, as it is by default, we will take this
path, and fail when trying to remove a source ID for undefined.

https://bugzilla.gnome.org/show_bug.cgi?id=706612

js/ui/endSessionDialog.js

index c36f5532d1476040697aff92e90dab48179503f9..48ff151bf56cac822a1c02724b07ad66b6bd5ec9 100644 (file)
@@ -442,7 +442,7 @@ const EndSessionDialog = new Lang.Class({
     },
 
     _stopTimer: function() {
-        if (this._timerId != 0) {
+        if (this._timerId > 0) {
             Mainloop.source_remove(this._timerId);
             this._timerId = 0;
         }